package oop4.graph;

/**
 * @author oldliu
 * @since 1.0
 */
public  class Triangle extends Graph {
    private double a;
    private double b;
    private double c;

    public Triangle() {
    }

    public Triangle(double a, double b, double c) {
        this.a = a;
        this.b = b;
        this.c = c;
    }

    @Override
    public double c() {
        return  a+b+c;
    }

    @Override
    public double f() {

        double  p=(a+b+c)/2;
        double f=Math.sqrt(p*(p-a)*(p-b)*(p-c));
        return  f;

    }

}
